/**
 * @ProjectName:exam
 * @FileName: BusSchedule.java
 * @PackageName: edu.xpu.project.vehicle.entity
 * @Company:北京有生博大软件有限公司（西安分公司）
 * @Copyright (c) 2017,RiseSoft  All Rights Reserved.
 * @date 2017年4月29日 下午5:03:16
 */
package edu.xpu.project.vehicle.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import edu.xpu.project.record.entity.BusBespeakRecord;

/**
 * @ClassName: BusSchedule.java
 * @Description: 车次时刻表
 *
 * @author liukang
 * @date 2017年4月29日 下午5:03:16
 * @version 
 * @since JDK 1.6
 */
@Entity(name="BusSchedule")
@Table(name="BUS_SCHEDULE")
public class BusSchedule implements Serializable {

	private static final long serialVersionUID = -1987257629357144963L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long id;
	
	private String scheduleNo;			//车次编号
	
	@Temporal(TemporalType.TIME)
	private Date startTime;
	@Temporal(TemporalType.TIME)
	private Date endTime;
	
	/**
	 * 1: 表示金花校区
	 * 2: 表示临潼校区
	 */
	private Integer startStation;		//始发站
	
	private Integer endStation;			//终点站
	
	/*
	 * 如果==0， 表示该车次没有出发
	 */
	private Integer useBusNum = 0;			//表示该车次派遣了多少车
	
	private Date createDate;
	
	/**
	 * 1: 
	 * 2: 已指派
	 */
	@Transient
	private Integer currentStatus;			//当前状态
	@Transient
	private Integer personNum;				//已预约人数
	
	/*
	 * 将每个车次的人放入该list
	 */
	@OneToMany(mappedBy="busSchedule")
	private Set<BusBespeakRecord> bespeakRecords;
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Integer getStartStation() {
		return startStation;
	}

	public void setStartStation(Integer startStation) {
		this.startStation = startStation;
	}

	public Integer getEndStation() {
		return endStation;
	}

	public void setEndStation(Integer endStation) {
		this.endStation = endStation;
	}

	public Integer getUseBusNum() {
		return useBusNum;
	}

	public void setUseBusNum(Integer useBusNum) {
		this.useBusNum = useBusNum;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Integer getCurrentStatus() {
		return currentStatus;
	}

	public void setCurrentStatus(Integer currentStatus) {
		this.currentStatus = currentStatus;
	}

	public Integer getPersonNum() {
		return personNum;
	}

	public void setPersonNum(Integer personNum) {
		this.personNum = personNum;
	}

	public String getScheduleNo() {
		return scheduleNo;
	}

	public void setScheduleNo(String scheduleNo) {
		this.scheduleNo = scheduleNo;
	}

	public Set<BusBespeakRecord> getBespeakRecords() {
		return bespeakRecords;
	}

	public void setBespeakRecords(Set<BusBespeakRecord> bespeakRecords) {
		this.bespeakRecords = bespeakRecords;
	}

}

